/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-10-05 18:45:02
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-10-07 23:05:15
 * @FilePath: \react_staging\src\App.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import axios from 'axios'
import React, { Component } from 'react'

export default class App extends Component {
	getStudent = () => {
		axios.get('/api1/search/users').then(
			(response) => {
				console.log('成功了', response.data)
			},
			(error) => {
				console.log('失败了', error)
			}
		)
	}
	getStudent2 = () => {
		axios.get('/api2/search/users2').then(
			(response) => {
				console.log('成功了2', response.data)
			},
			(error) => {
				console.log('失败了2', error)
			}
		)
	}
	render() {
		return (
			<div>
				<button onClick={this.getStudent}>获取学生数据users</button>
				<button onClick={this.getStudent2}>获取学生数据users2</button>
			</div>
		)
	}
}
